package com.zany.children.service;

import com.zany.children.dao.PaymentProjectDao;
import com.zany.children.vo.PaymentProject;

import java.util.List;
import java.util.Map;

public class PaymentProjectServiceImpl implements PaymentProjectService {

    private PaymentProjectDao paymentProjectDao;

    @Override
    public List<PaymentProject> getPaymentProjectListPage(PaymentProject paymentProject) {
        List<PaymentProject> projectListPage = paymentProjectDao.getPaymentProjectListPage(paymentProject);
        return projectListPage;
    }

    @Override
    public Integer getPaymentProjectListPageCount(PaymentProject paymentProject) {
        Integer count = paymentProjectDao.getPaymentProjectListPageCount(paymentProject);
        return count;
    }

    @Override
    public Long savePaymentProject(PaymentProject paymentProject) {
        Long id = paymentProjectDao.savePaymentProject(paymentProject);
        return id;
    }

    @Override
    public void updatePaymentProject(PaymentProject paymentProject) {
        paymentProjectDao.updatePaymentProject(paymentProject);
    }

    @Override
    public void deletePaymentProjectById(Long id) {
        paymentProjectDao.deletePaymentProjectById(id);
    }

    public void setPaymentProjectDao(PaymentProjectDao paymentProjectDao) {
        this.paymentProjectDao = paymentProjectDao;
    }

    public PaymentProjectDao getPaymentProjectDao() {
        return paymentProjectDao;
    }


    @Override
    public PaymentProject getPaymentProjectById(Long id) {
        PaymentProject paymentProject = paymentProjectDao.getPaymentProjectById(id);
        return paymentProject;
    }

    @Override
    public List<PaymentProject> getPaymentProject(Map<String, Object> map) {
        return paymentProjectDao.getPaymentProject(map);
    }
}
